package com.kamistoat.meimeimall.common.snGenerater;


public class SnIdentifierGenerator {
    private final SnSequence sequence;

    public SnIdentifierGenerator() {
        this.sequence = new SnSequence();
    }

    public SnIdentifierGenerator(long workerId, long dataCenterId) {
        this.sequence = new SnSequence(workerId, dataCenterId);
    }

    public SnIdentifierGenerator(SnSequence sequence) {
        this.sequence = sequence;
    }

    public Long nextId(Object entity) {
        return sequence.nextId();
    }
}
